export function modelInstanceColumns() {
  return [
    {
      title: this.$t('module.launchApp.processTitle'),
      key: 'name',
      ellipsis: true,
      minWidth: 140
    },
    {
      title: this.$t('module.launchApp.modelName'),
      key: 'procDefName',
      ellipsis: false,
      minWidth: 160
    },
    {
      title: this.$t('module.launchApp.modelKey'),
      key: 'procDefKey',
      ellipsis: false,
      minWidth: 100
    },
    {
      title: this.$t('module.launchApp.version'),
      key: 'version',
      ellipsis: false,
      minWidth: 65
    },
    {
      title: this.$t('module.launchApp.suspensionState'),
      key: 'suspensionState',
      minWidth: 85,
      align: 'center',
      render: (h, params) => {
        return h(
          'span',
          params.row.suspensionState === 2
            ? this.$t('module.launchApp.suspendState')
            : this.$t('module.launchApp.activeState')
        )
      }
    },
    {
      title: this.$t('common.status'),
      key: 'status',
      minWidth: 65,
      render: (h, params) => {
        return h(
          'StatusButton',
          {
            props: {
              status: !!params.row.endTime
            }
          },
          params.row.status
        )
      }
    },
    {
      title: this.$t('module.launchApp.startTime'),
      key: 'startTime',
      minWidth: 140
    },
    {
      title: this.$t('module.launchApp.creatorID'),
      key: 'startUserId',
      minWidth: 80
    },
    {
      title: this.$t('module.launchApp.creatorName'),
      key: 'startUserName',
      minWidth: 80
    },
    {
      title: this.$t('module.launchApp.endTime'),
      key: 'endTime',
      minWidth: 140
    },
    {
      title: this.$t('common.operating'),
      align: 'center',
      fixed: 'right',
      width: 70,
      render: (h, params) => {
        return h('RowTools', {
          props: {
            data: [
              {
                type: 'icon',
                icon: 'ios-list-box-outline',
                text: this.$t('module.launchApp.openDetail'),
                handle: () => {
                  this._launchProcess(params.row)
                }
              }
            ]
          }
        })
      }
    }
  ]
}
